import { NgModule } from '@angular/core'
import { SharedModule } from '@shared'
import { PostRiskRoutingModule } from './post-risk-routing.module'
import { ListComponent } from './list/list.component'
import { DetailComponent } from './detail/detail.component'
import { PostRiskService } from './post-risk.service'
import { RiskAlinterService } from './post-risk-alinter.service'
import { NewComponent } from './new/new.component'
import { TabBaseComponent } from './new/tab-base/tab-base.component'
import { TabEditRulesComponent } from './new/tab-edit-rules/tab-edit-rules.component'
import { TabMerchantComponent } from './new/tab-merchant/tab-merchant.component'
import { PostRiskStoreService } from './new/post-risk-store.service'
import { StoreService } from '../store/store.service'
import { StoreAlinterService } from '../store/store-alinter.service'
import { StoreDataService } from '../store/store-data.service'

const COMPONENTS = []
const COMPONENTS_NOROUNT = [TabBaseComponent, TabEditRulesComponent, TabMerchantComponent]

@NgModule({
  imports: [SharedModule, PostRiskRoutingModule],
  declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT, ListComponent, DetailComponent, NewComponent],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    PostRiskStoreService,
    StoreDataService,
    { provide: StoreService, useClass: StoreAlinterService },
    { provide: PostRiskService, useClass: RiskAlinterService },
  ],
})
export class PostRiskModule {}
